import request from '@/utils/request'

// 查询餐馆评论列表
export function listResreview(query) {
  return request({
    url: '/system/resreview/list',
    method: 'get',
    params: query
  })
}

export function listResreview1(query, userId) {
  return request({
    url: '/system/resreview/list1',
    method: 'get',
    params: {
      ...query,
      userId: userId
    }
  })
}

// 查询餐馆评论详细
export function getResreview(reviewId) {
  return request({
    url: '/system/resreview/' + reviewId,
    method: 'get'
  })
}

// 新增餐馆评论
export function addResreview(data) {
  return request({
    url: '/system/resreview',
    method: 'post',
    data: data
  })
}

// 修改餐馆评论
export function updateResreview(data) {
  return request({
    url: '/system/resreview',
    method: 'put',
    data: data
  })
}

// 删除餐馆评论
export function delResreview(reviewId) {
  return request({
    url: '/system/resreview/' + reviewId,
    method: 'delete'
  })
}
